//
//  helpController.m
//  SSSAllRollAgency
//
//  Created by Darker on 2017/3/15.
//  Copyright © 2017年 Darker. All rights reserved.
//

#import "helpController.h"
#import "commonCell.h"

@interface helpController ()<UITableViewDelegate,UITableViewDataSource>

{
    
    UITableView *_helpTabelView;
    NSArray *_dataArray;
}

@end

static NSString *helpID    = @"helpID";

@implementation helpController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    self.title = @"帮助";
    //去掉透明后导航栏下边的黑边
    //    [self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
    self.navigationController.navigationBar.hidden = NO;
    self.view.backgroundColor = [UIColor colorWithHex:@"F9F9FA"];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    _dataArray = @[@"关于登录问题",@"银行卡绑定问题",@"身份证信息安全问题",@"如何兑换善心善点问题",@"提现到账问题",@"下级代理商的问题",@"联系我们",@"身份证"];
    [self setUpApperance];

    
}
- (void)setUpApperance{
    
    _helpTabelView = [[UITableView alloc]initWithFrame:CGRectMake(0,64+ HeigthIos6CompeteWithCurrent(14), KSCREEN_Width, KSCREEN_Height - 64 - HeigthIos6CompeteWithCurrent(14)) style:UITableViewStylePlain];
    _helpTabelView.delegate = self;
    _helpTabelView.dataSource = self;
    _helpTabelView.separatorStyle = UITableViewCellSeparatorStyleNone;
    _helpTabelView.bounces = NO;
    _helpTabelView.backgroundColor = [UIColor colorWithHex:@"FFFFFF"];
    [self.view addSubview:_helpTabelView];
    _helpTabelView.rowHeight = HeigthIos6CompeteWithCurrent(50);
    _helpTabelView.contentInset = UIEdgeInsetsMake(-64, 0, 0, 0);
    
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return _dataArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    Class currentClass = [commonCell class];
    
    commonCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(currentClass)];
    if (!cell) {
        cell = [[commonCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:helpID];
    }
    cell.nameLabel.text = _dataArray[indexPath.row];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    
    //cell.nameLabel.text = _selectedDataArray[indexPath.row];
    return cell;

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
